#!/usr/bin/python
# -*- coding: UTF-8 -*-
import matplotlib.pyplot as plot
import numpy as np

x=np.linspace(0,5*np.pi,1000)
y1=np.sin(x)
y2=np.sin(2*x)

fig=plot.figure()
ax=plot.gca()
ax.plot(x,y1,color="r")
ax.plot(x,y2,color="b")
# ax.fill_between(x,y1,y2,facecolors="b") interpolate 填充断续的值
ax.fill_between(x,y1,y2,where=y1>y2,facecolors="yellow",interpolate=True)
ax.fill_between(x,y1,y2,where=y2>y1,facecolors="green",interpolate=True)
plot.show()


def show1():
    plot.fill(x, y1, "b", alpha=0.3)
    plot.fill(x, y2, "r", alpha=0.3)
    plot.show()



